package com.itheima2.work6;


import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;

public class PalindromeNumber {
    public static void main(String[] args) {
        ArrayList list = new ArrayList();
        for (int i = 10000; i <=99999 ; i++) {
//            double a =100;
//            BigDecimal b = new BigDecimal(String.valueOf(a));
            double s = Math.sqrt(i);//2.5 INT 2
            int i1 = (int) s;
            int i2 = i1 * i1;
            if (i2 != i) {

            } else {
                list.add(i2);
            }
        }




                for (int j = 0; j <list.size() ; j++) {
                    String s1 = String.valueOf(list.get(j));
                    StringBuilder s2 = new StringBuilder(s1);
                    String s3 = s2.reverse().toString();
                    if (s3.equals(s1)){
                        System.out.println(s1);
                    }
                }
    }
}

